#ifndef _EEPROM_H_
#define _EEPROM_H_

#include "bsp_iic.h"
#include "My_Delay.h"

/* EERPOM DATA ADDRESS Length Definition */
#define Address_8bit     0
#define Address_16bit    1

/* EERPOM DATA ADDRESS Length Selection */
//#define Address_Lenth    Address_8bit
#define Address_Lenth   Address_16bit

class E2PROM {
private:
    BSP_IIC    dev;

    void    WriteOneByte(u16 WriteAddr, u8 DataToWrite);
    u8      ReadOneByte(u16 ReadAddr);

public:
    E2PROM();
    ~E2PROM();

    void Write(u16 WriteAddr, u8 *pBuffer, u16 NumToWrite);
    void Read(u16 ReadAddr, u8 *pBuffer, u16 NumToRead);
};

#endif
